<?php
	echo $this->Html->script('backend/tiny_mce/plugins/imagemanager/js/mcimagemanager');
    echo $this->Form->create('Course', array(
	        'url'   => array('action' => $this->request->params['action']),
	        'class' => 'form label-inline',
	        'inputDefaults' => array('div' => array('class' => 'field')),
    		// Nombre del campo
    		'name' => 'courses'
        )
    );
    echo $this->Form->inputs(array(
        'id',
        'title',
        'price',
        'percentage',
        'status',
        'last',
    	// Campo para guardar la imagen de portada del curso
        'image'=>array('after'=>"<a href=\"javascript:mcImageManager.open('courses','data[Course][image]','','',{rootpath : 'files/coursesimages', remove_script_host : true});\">[Seleccionar Imagen]</a>"),
        'fieldset' => false
    ));
    echo $this->Form->end(array('class' => 'btn', 'div' => array('class'=>'buttonrow'), 'label' => 'Guardar'));
?>